<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LibTools: H:/project/LibTools/src/framework/tcp/framework/Client.cpp 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LibTools
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.16 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','搜索');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_5752cadd8276ecfd63d9b924f2a4d4b5.html">framework</a></li><li class="navelem"><a class="el" href="dir_c67741c6509c9bd4aec6faa9fd694608.html">tcp</a></li><li class="navelem"><a class="el" href="dir_cf0ab36ee90451b75992f2af7ab5af86.html">framework</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">Client.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_client_8cpp.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#include &quot;../../../socket/internal/IoPortService.h&quot;</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#include &quot;../../../socket/TcpIoServer.h&quot;</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &quot;../../../socket/TcpIoSocket.h&quot;</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &quot;../../../socket/Timer.h&quot;</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &quot;../../../log/LogFactory.h&quot;</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &quot;../ClassFactory.h&quot;</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_client_8h.html">Client.h</a>&quot;</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_server_8h.html">Server.h</a>&quot;</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &lt;memory&gt;</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160; </div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<a class="code" href="tools_8h.html#a201ce692c9dca6599e5c12d00167419b">DEF_BEG_LIBTOOLS</a></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160; </div>
<div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="class_client.html#afb79191c921f4055e98a1630a328a850">   13</a></span>&#160;<a class="code" href="class_client.html#afb79191c921f4055e98a1630a328a850">Client::Client</a>() :_invoker(<a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>), _isClose(true), _service(<a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>) </div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;{</div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;}</div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160; </div>
<div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="class_client.html#a5fabc562003537af15d94c77ca52158f">   17</a></span>&#160;<a class="code" href="class_client.html#afb79191c921f4055e98a1630a328a850">Client::Client</a>(<a class="code" href="class_c_basic_service.html">CBasicService</a>* service) : _cliSock(new <a class="code" href="class_c_tcp_io_socket.html">CTcpIoSocket</a>(service)), _timer(new <a class="code" href="class_c_timer.html">CTimer</a>(service)), _isClose(false), _service(<a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>)</div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;{</div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160; </div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;}</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160; </div>
<div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="class_client.html#a840e519ca781888cbd54181572ebe3a7">   22</a></span>&#160;<a class="code" href="class_client.html#a840e519ca781888cbd54181572ebe3a7">Client::~Client</a>()</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;{</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    <a class="code" href="class_client.html#ac9ef3d3342a564f93d6d94ee795a28c0">_cliSock</a>.<a class="code" href="class_shared_ptr.html#a0b0a4c8396bf40f91994f729855c0a5a">Reset</a>(<a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>);</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    <a class="code" href="class_client.html#aeed5abe9b4741420e5abe29b42c4f621">_timer</a>.<a class="code" href="class_shared_ptr.html#a0b0a4c8396bf40f91994f729855c0a5a">Reset</a>(<a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>);</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;}</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160; </div>
<div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="class_client.html#ab456001d31b45d928002a1a9b75990b4">   28</a></span>&#160;<a class="code" href="tools_8h.html#a798af1e30bc65f319c1a246cecf59e39">DWORD</a> <a class="code" href="class_client.html#ab456001d31b45d928002a1a9b75990b4">Client::_ReadComplete</a>(<span class="keywordtype">char</span>* data, <a class="code" href="tools_8h.html#a798af1e30bc65f319c1a246cecf59e39">DWORD</a> dwSize, <a class="code" href="class_c_sock_error.html">CSockError</a> ec, <span class="keywordtype">void</span>* invoker)</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;{</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    <a class="code" href="class_client.html">Client</a>* pThis = (<a class="code" href="class_client.html">Client</a>*)invoker;</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160; </div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    <span class="keywordflow">if</span> (ec) <span class="keywordflow">return</span> pThis-&gt;<a class="code" href="class_client.html#a7908db69b4f09eebe469fc69ff0e0c42">ReadComplete</a>(dwSize, ec.GetErrorMsg().c_str());</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    <span class="keywordflow">return</span> (<a class="code" href="tools_8h.html#a798af1e30bc65f319c1a246cecf59e39">DWORD</a>)pThis-&gt;<a class="code" href="class_client.html#a7908db69b4f09eebe469fc69ff0e0c42">ReadComplete</a>(dwSize, <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>);</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;}</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160; </div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="class_client.html#a7eedb09b405e65dfdb88700d35d7b382">   36</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="class_client.html#a7eedb09b405e65dfdb88700d35d7b382">Client::GetSocket</a>()<span class="keyword"> const </span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="keyword"></span>{</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;    <span class="keywordflow">return</span> (<span class="keywordtype">int</span>)*(<a class="code" href="class_client.html#ac9ef3d3342a564f93d6d94ee795a28c0">_cliSock</a>-&gt;<a class="code" href="class_c_socket.html#abfcf493607b9c1b40db907d89731d4a9">GetSockPtr</a>()); </div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;}</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160; </div>
<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="class_client.html#a8f2e8a7927adb30f14a28dc6d606e941">   41</a></span>&#160;<a class="code" href="_sock_tools_8h.html#ac7875a7f6984241a06892f7041b4d30a">SOCKIDEN</a> <a class="code" href="class_client.html#a8f2e8a7927adb30f14a28dc6d606e941">Client::GetSocketIden</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="keyword"></span>{</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_client.html#ac9ef3d3342a564f93d6d94ee795a28c0">_cliSock</a>-&gt;<a class="code" href="class_c_socket.html#a31c4a61d9f5a4b6cbada3894c7d70c66">GetSocketID</a>();</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;}</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160; </div>
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="class_client.html#aceeb18e407bb39e5368fa2ab27d66a88">   46</a></span>&#160;std::string <a class="code" href="class_client.html#aceeb18e407bb39e5368fa2ab27d66a88">Client::GetClientIden</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="keyword"></span>{</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_client.html#a5922d4b508779e8788fdbd3a6d137b01">_service</a>-&gt;<a class="code" href="class_service.html#a040c5f1db96aad100bb713db069bc19e">GetClientIden</a>(const_cast&lt;Client*&gt;(<span class="keyword">this</span>));</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;}</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160; </div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="class_client.html#a7d8756d14bc296e6fb7e4cfdb10bd888">   51</a></span>&#160;<a class="code" href="tools_8h.html#a798af1e30bc65f319c1a246cecf59e39">DWORD</a> <a class="code" href="class_client.html#a7d8756d14bc296e6fb7e4cfdb10bd888">Client::_WriteComplete</a>(<span class="keywordtype">char</span>* data, <a class="code" href="tools_8h.html#a798af1e30bc65f319c1a246cecf59e39">DWORD</a> dwSize, <a class="code" href="class_c_sock_error.html">CSockError</a> ec, <span class="keywordtype">void</span>* invoker)</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;{</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    <a class="code" href="class_client.html">Client</a>* pThis = (<a class="code" href="class_client.html">Client</a>*)invoker;</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160; </div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    <span class="keywordflow">if</span> (ec) <span class="keywordflow">return</span> pThis-&gt;<a class="code" href="class_client.html#a812ce38df4b1cd81b2b057733f998f49">WriteComplete</a>(dwSize, ec.GetErrorMsg().c_str());</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    <span class="keywordflow">return</span> (<a class="code" href="tools_8h.html#a798af1e30bc65f319c1a246cecf59e39">DWORD</a>)pThis-&gt;<a class="code" href="class_client.html#a812ce38df4b1cd81b2b057733f998f49">WriteComplete</a>(dwSize, <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>);</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;}</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160; </div>
<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="class_client.html#aa744595a1b6ac4625c1becccc070fdf8">   59</a></span>&#160;<a class="code" href="tools_8h.html#a798af1e30bc65f319c1a246cecf59e39">DWORD</a> <a class="code" href="class_client.html#aa744595a1b6ac4625c1becccc070fdf8">Client::_PostComplete</a>(<span class="keywordtype">char</span>* data, <a class="code" href="tools_8h.html#a798af1e30bc65f319c1a246cecf59e39">DWORD</a> dwSize, <a class="code" href="class_c_sock_error.html">CSockError</a> ec, <span class="keywordtype">void</span>* invoker)</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;{</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    <a class="code" href="_sock_tools_8h.html#a19358efe08e40c8fe899cbec837c5d87">lpPostCompleteFunc</a> complete = (<a class="code" href="_sock_tools_8h.html#a19358efe08e40c8fe899cbec837c5d87">lpPostCompleteFunc</a>)data;</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    <span class="keywordflow">return</span> complete(invoker);</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;}</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160; </div>
<div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="class_client.html#ae044429f6533cd0c275f58a2aeef5a1c">   65</a></span>&#160;<a class="code" href="tools_8h.html#a798af1e30bc65f319c1a246cecf59e39">DWORD</a> <a class="code" href="class_client.html#ae044429f6533cd0c275f58a2aeef5a1c">Client::_TimeoutComplete</a>(<a class="code" href="class_c_sock_error.html">CSockError</a> ec, <span class="keywordtype">void</span>* invoker)</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;{</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    <a class="code" href="class_client.html">Client</a>* pThis = (<a class="code" href="class_client.html">Client</a>*)invoker;</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160; </div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    <span class="keywordflow">if</span> (ec.GetError() != <a class="code" href="namespace_s_o_c_k_e_t_s_t_a_t_u_s.html#a960fa087f22eb32da3c7d0c805be7876a21f4b3f4919004aed6322dd5435c430c">CSockError::TIMEOUT</a>) {</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;        pThis-&gt;<a class="code" href="class_client.html#a3a51b4121807ea860a242a86cfb9e9ab">TimeoutComplete</a>(ec.GetErrorMsg().c_str());</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    }</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;        pThis-&gt;<a class="code" href="class_client.html#a3a51b4121807ea860a242a86cfb9e9ab">TimeoutComplete</a>(<a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>);</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    }</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;}</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160; </div>
<div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="class_client.html#a37839a1150d07286be0f8c2c06b58ba0">   78</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_client.html#a37839a1150d07286be0f8c2c06b58ba0">Client::PostRecv</a>(<span class="keywordtype">char</span>* buff, <span class="keywordtype">size_t</span> size)</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;{</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_client.html#ab206b489dcd55b5397b6360b62dbb22e">_isClose</a> == <span class="keyword">false</span>){</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;        <a class="code" href="class_client.html#ac9ef3d3342a564f93d6d94ee795a28c0">_cliSock</a>-&gt;<a class="code" href="class_c_tcp_io_socket.html#ac93112cd926967d84b44344285aaa04d">AsyncRead</a>(<a class="code" href="class_c_stream_iteator.html">CStreamIteator</a>(buff, buff + size), &amp;<a class="code" href="class_client.html#ab456001d31b45d928002a1a9b75990b4">Client::_ReadComplete</a>, <span class="keyword">this</span>);</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    }</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;}</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160; </div>
<div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="class_client.html#a55414f48e08b0aaaec28ff8086f21c30">   85</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_client.html#a55414f48e08b0aaaec28ff8086f21c30">Client::PostWrite</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* buff, <span class="keywordtype">size_t</span> size)</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;{</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_client.html#ab206b489dcd55b5397b6360b62dbb22e">_isClose</a> == <span class="keyword">false</span>){</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;        <a class="code" href="class_client.html#ac9ef3d3342a564f93d6d94ee795a28c0">_cliSock</a>-&gt;<a class="code" href="class_c_tcp_io_socket.html#a8f5c6e049211a3f7c607d5bdfa978649">AsyncSend</a>(<a class="code" href="class_c_stream_iteator.html">CStreamIteator</a>(const_cast&lt;char*&gt;(buff), const_cast&lt;char*&gt;(buff) + size), &amp;<a class="code" href="class_client.html#a7d8756d14bc296e6fb7e4cfdb10bd888">Client::_WriteComplete</a>, <span class="keyword">this</span>);</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    }</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;}</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160; </div>
<div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="class_client.html#aa9714e538888d94b2c9c2acc1a4f4a68">   92</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_client.html#aa9714e538888d94b2c9c2acc1a4f4a68">Client::Post</a>(<a class="code" href="tools_8h.html#a798af1e30bc65f319c1a246cecf59e39">DWORD</a>(*complete)(<span class="keywordtype">void</span>*), <span class="keywordtype">void</span>* invoker)</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;{</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_client.html#ab206b489dcd55b5397b6360b62dbb22e">_isClose</a> == <span class="keyword">false</span>)</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    {</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;        <span class="comment">// 之所有投递一个0字节接收是因为可以在客户端删除之前取消掉此操作，而不至于引起coredump</span></div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;        <a class="code" href="class_client.html#ac9ef3d3342a564f93d6d94ee795a28c0">_cliSock</a>-&gt;<a class="code" href="class_c_tcp_io_socket.html#ac93112cd926967d84b44344285aaa04d">AsyncRead</a>(<a class="code" href="class_c_stream_iteator.html">CStreamIteator</a>((<span class="keywordtype">char</span>*)complete, 0), &amp;<a class="code" href="class_client.html#aa744595a1b6ac4625c1becccc070fdf8">Client::_PostComplete</a>, invoker);</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    }</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160; </div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;}</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160; </div>
<div class="line"><a name="l00104"></a><span class="lineno"><a class="line" href="class_client.html#aaf6a8239f1f36ef898d289860d7dacb3">  104</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_client.html#aaf6a8239f1f36ef898d289860d7dacb3">Client::Close</a>()</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;{</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_client.html#ab206b489dcd55b5397b6360b62dbb22e">_isClose</a> == <span class="keyword">false</span>)</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    {</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;        <a class="code" href="_sock_tools_8h.html#ac7875a7f6984241a06892f7041b4d30a">SOCKIDEN</a> <span class="keywordtype">id</span> = <a class="code" href="class_client.html#a8f2e8a7927adb30f14a28dc6d606e941">GetSocketIden</a>();</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;        <a class="code" href="class_client.html#ab206b489dcd55b5397b6360b62dbb22e">_isClose</a> = <span class="keyword">true</span>;</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;        <a class="code" href="class_client.html#ac9ef3d3342a564f93d6d94ee795a28c0">_cliSock</a>-&gt;<a class="code" href="class_c_socket.html#aa915ac02c07eed947bf2da35eacc3545">Close</a>();</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;        <a class="code" href="class_client.html#aeed5abe9b4741420e5abe29b42c4f621">_timer</a>-&gt;<a class="code" href="class_c_timer.html#a745607665b797d5d68e90d32f221304b">Cancel</a>();</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;        <a class="code" href="class_c_tcp_io_socket.html#a6a56c3461c4b9a5203c135278e4a287b">CTcpIoSocket::Post</a>(<a class="code" href="class_client.html#a5922d4b508779e8788fdbd3a6d137b01">_service</a>-&gt;<a class="code" href="class_service.html#a9ea329d8d3607adcd3e03a94a0585217">GetTcpService</a>(), <a class="code" href="struct_service_1_1_delete_function.html">Service::DeleteFunction</a>(<a class="code" href="class_client.html#a5922d4b508779e8788fdbd3a6d137b01">_service</a>), (<span class="keywordtype">void</span>*)<span class="keywordtype">id</span>);</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;    }</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;}</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160; </div>
<div class="line"><a name="l00116"></a><span class="lineno"><a class="line" href="class_client.html#adfe1866466f5be9eca92dd6319eb56c1">  116</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_client.html#adfe1866466f5be9eca92dd6319eb56c1">Client::SetTimeout</a>(<span class="keyword">const</span> <a class="code" href="class_c_time_base.html">CTimeBase</a>&amp; t)</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;{</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_client.html#ab206b489dcd55b5397b6360b62dbb22e">_isClose</a> == <span class="keyword">false</span>) {</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;        <a class="code" href="class_client.html#aeed5abe9b4741420e5abe29b42c4f621">_timer</a>-&gt;<a class="code" href="class_c_timer.html#afadf9bf2c7fe7f1a6d7c34cbf90f979e">SetTimer</a>(t, &amp;<a class="code" href="class_client.html#ae044429f6533cd0c275f58a2aeef5a1c">Client::_TimeoutComplete</a>, <span class="keyword">this</span>);</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    }</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;}</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160; </div>
<div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="class_client.html#a653283b5bd6d57c855b32eeaea0ebfd4">  123</a></span>&#160;<a class="code" href="class_c_machine_time.html">CMachineTime</a>* <a class="code" href="class_client.html#a653283b5bd6d57c855b32eeaea0ebfd4">Client::StartTime</a>(<a class="code" href="class_c_machine_time.html">CMachineTime</a>&amp; t)</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;{</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_client.html#ab206b489dcd55b5397b6360b62dbb22e">_isClose</a> == <span class="keyword">false</span>) {</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;        <span class="keywordflow">if</span>(<a class="code" href="class_client.html#aeed5abe9b4741420e5abe29b42c4f621">_timer</a>) <span class="keywordflow">return</span> <a class="code" href="class_client.html#aeed5abe9b4741420e5abe29b42c4f621">_timer</a>-&gt;<a class="code" href="class_c_timer.html#a4963ccc407406050df39d7b7e9346625">StartTime</a>(t);</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    }</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160; </div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>;</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;}</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160; </div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160; </div>
<div class="line"><a name="l00133"></a><span class="lineno"><a class="line" href="class_client.html#a199f02fb548197610325ffad0bf0946b">  133</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_client.html#a199f02fb548197610325ffad0bf0946b">Client::ResetTimer</a>()</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;{</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_client.html#ab206b489dcd55b5397b6360b62dbb22e">_isClose</a> == <span class="keyword">false</span>) {</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="class_client.html#aeed5abe9b4741420e5abe29b42c4f621">_timer</a>) <span class="keywordflow">return</span> <a class="code" href="class_client.html#aeed5abe9b4741420e5abe29b42c4f621">_timer</a>-&gt;<a class="code" href="class_c_timer.html#a744d36ea8c827184cf2cc8634b924574">Reset</a>();</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    }</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160; </div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;}</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160; </div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;<a class="code" href="tools_8h.html#ac909db71799bb22cb7d636a34cd785e4">DEF_END_LIBTOOLS</a></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aclass_c_timer_html_a744d36ea8c827184cf2cc8634b924574"><div class="ttname"><a href="class_c_timer.html#a744d36ea8c827184cf2cc8634b924574">CTimer::Reset</a></div><div class="ttdeci">bool Reset()</div><div class="ttdoc">重置定时器</div><div class="ttdef"><b>Definition:</b> <a href="_timer_8h_source.html#l00089">Timer.h:89</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_socket_html_a6a56c3461c4b9a5203c135278e4a287b"><div class="ttname"><a href="class_c_tcp_io_socket.html#a6a56c3461c4b9a5203c135278e4a287b">CTcpIoSocket::Post</a></div><div class="ttdeci">static void Post(CTcpIoClass *service, const Func &amp;func)</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_socket_8h_source.html#l00156">TcpIoSocket.h:156</a></div></div>
<div class="ttc" id="aclass_c_sock_error_html"><div class="ttname"><a href="class_c_sock_error.html">CSockError</a></div><div class="ttdoc">套接字错误信息类</div><div class="ttdef"><b>Definition:</b> <a href="_sock_error_8h_source.html#l00013">SockError.h:13</a></div></div>
<div class="ttc" id="aclass_client_html_aa744595a1b6ac4625c1becccc070fdf8"><div class="ttname"><a href="class_client.html#aa744595a1b6ac4625c1becccc070fdf8">Client::_PostComplete</a></div><div class="ttdeci">static DWORD _PostComplete(char *data, DWORD dwSize, CSockError ec, void *invoker)</div><div class="ttdef"><b>Definition:</b> <a href="_client_8cpp_source.html#l00059">Client.cpp:59</a></div></div>
<div class="ttc" id="aclass_c_timer_html_a745607665b797d5d68e90d32f221304b"><div class="ttname"><a href="class_c_timer.html#a745607665b797d5d68e90d32f221304b">CTimer::Cancel</a></div><div class="ttdeci">bool Cancel()</div><div class="ttdoc">取消定时器</div><div class="ttdef"><b>Definition:</b> <a href="_timer_8h_source.html#l00098">Timer.h:98</a></div></div>
<div class="ttc" id="aclass_c_stream_iteator_html"><div class="ttname"><a href="class_c_stream_iteator.html">CStreamIteator</a></div><div class="ttdef"><b>Definition:</b> <a href="_stream_byte_8h_source.html#l00011">StreamByte.h:11</a></div></div>
<div class="ttc" id="aclass_client_html_a8f2e8a7927adb30f14a28dc6d606e941"><div class="ttname"><a href="class_client.html#a8f2e8a7927adb30f14a28dc6d606e941">Client::GetSocketIden</a></div><div class="ttdeci">virtual SOCKIDEN GetSocketIden() const</div><div class="ttdoc">获取socket id</div><div class="ttdef"><b>Definition:</b> <a href="_client_8cpp_source.html#l00041">Client.cpp:41</a></div></div>
<div class="ttc" id="a_server_8h_html"><div class="ttname"><a href="_server_8h.html">Server.h</a></div></div>
<div class="ttc" id="aclass_client_html_ab456001d31b45d928002a1a9b75990b4"><div class="ttname"><a href="class_client.html#ab456001d31b45d928002a1a9b75990b4">Client::_ReadComplete</a></div><div class="ttdeci">static DWORD _ReadComplete(char *data, DWORD dwSize, CSockError ec, void *invoker)</div><div class="ttdef"><b>Definition:</b> <a href="_client_8cpp_source.html#l00028">Client.cpp:28</a></div></div>
<div class="ttc" id="aclass_client_html_aeed5abe9b4741420e5abe29b42c4f621"><div class="ttname"><a href="class_client.html#aeed5abe9b4741420e5abe29b42c4f621">Client::_timer</a></div><div class="ttdeci">SharedPtr&lt; CTimer &gt; _timer</div><div class="ttdef"><b>Definition:</b> <a href="_client_8h_source.html#l00104">Client.h:104</a></div></div>
<div class="ttc" id="aclass_c_time_base_html"><div class="ttname"><a href="class_c_time_base.html">CTimeBase</a></div><div class="ttdoc">时间基类</div><div class="ttdef"><b>Definition:</b> <a href="_time_8h_source.html#l00078">Time.h:78</a></div></div>
<div class="ttc" id="aclass_client_html_ab206b489dcd55b5397b6360b62dbb22e"><div class="ttname"><a href="class_client.html#ab206b489dcd55b5397b6360b62dbb22e">Client::_isClose</a></div><div class="ttdeci">bool _isClose</div><div class="ttdef"><b>Definition:</b> <a href="_client_8h_source.html#l00106">Client.h:106</a></div></div>
<div class="ttc" id="a_sock_tools_8h_html_ac7875a7f6984241a06892f7041b4d30a"><div class="ttname"><a href="_sock_tools_8h.html#ac7875a7f6984241a06892f7041b4d30a">SOCKIDEN</a></div><div class="ttdeci">DEF_BEG_LIBTOOLS typedef INT64 SOCKIDEN</div><div class="ttdoc">SOCKET唯一标识符ID</div><div class="ttdef"><b>Definition:</b> <a href="_sock_tools_8h_source.html#l00019">SockTools.h:19</a></div></div>
<div class="ttc" id="atools_8h_html_a201ce692c9dca6599e5c12d00167419b"><div class="ttname"><a href="tools_8h.html#a201ce692c9dca6599e5c12d00167419b">DEF_BEG_LIBTOOLS</a></div><div class="ttdeci">#define DEF_BEG_LIBTOOLS</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00036">tools.h:36</a></div></div>
<div class="ttc" id="aclass_client_html_a55414f48e08b0aaaec28ff8086f21c30"><div class="ttname"><a href="class_client.html#a55414f48e08b0aaaec28ff8086f21c30">Client::PostWrite</a></div><div class="ttdeci">virtual void PostWrite(const char *buff, size_t size)</div><div class="ttdoc">投递写</div><div class="ttdef"><b>Definition:</b> <a href="_client_8cpp_source.html#l00085">Client.cpp:85</a></div></div>
<div class="ttc" id="aclass_client_html_a7908db69b4f09eebe469fc69ff0e0c42"><div class="ttname"><a href="class_client.html#a7908db69b4f09eebe469fc69ff0e0c42">Client::ReadComplete</a></div><div class="ttdeci">virtual int ReadComplete(unsigned int dealSize, const char *msg)</div><div class="ttdoc">读完成处理函数</div><div class="ttdef"><b>Definition:</b> <a href="_client_8h_source.html#l00041">Client.h:41</a></div></div>
<div class="ttc" id="aclass_client_html_a653283b5bd6d57c855b32eeaea0ebfd4"><div class="ttname"><a href="class_client.html#a653283b5bd6d57c855b32eeaea0ebfd4">Client::StartTime</a></div><div class="ttdeci">virtual CMachineTime * StartTime(CMachineTime &amp;t)</div><div class="ttdoc">获取定时器起始时间</div><div class="ttdef"><b>Definition:</b> <a href="_client_8cpp_source.html#l00123">Client.cpp:123</a></div></div>
<div class="ttc" id="aclass_client_html_adfe1866466f5be9eca92dd6319eb56c1"><div class="ttname"><a href="class_client.html#adfe1866466f5be9eca92dd6319eb56c1">Client::SetTimeout</a></div><div class="ttdeci">virtual void SetTimeout(const CTimeBase &amp;t)</div><div class="ttdoc">设置超时,派生类可以重写此功能以便重设</div><div class="ttdef"><b>Definition:</b> <a href="_client_8cpp_source.html#l00116">Client.cpp:116</a></div></div>
<div class="ttc" id="aclass_service_html_a9ea329d8d3607adcd3e03a94a0585217"><div class="ttname"><a href="class_service.html#a9ea329d8d3607adcd3e03a94a0585217">Service::GetTcpService</a></div><div class="ttdeci">virtual CBasicService * GetTcpService() const =0</div><div class="ttdoc">获取tcp底层类指针</div></div>
<div class="ttc" id="aclass_client_html_a812ce38df4b1cd81b2b057733f998f49"><div class="ttname"><a href="class_client.html#a812ce38df4b1cd81b2b057733f998f49">Client::WriteComplete</a></div><div class="ttdeci">virtual int WriteComplete(unsigned int dealSize, const char *msg)</div><div class="ttdoc">写完成处理函数</div><div class="ttdef"><b>Definition:</b> <a href="_client_8h_source.html#l00050">Client.h:50</a></div></div>
<div class="ttc" id="aclass_client_html_a7d8756d14bc296e6fb7e4cfdb10bd888"><div class="ttname"><a href="class_client.html#a7d8756d14bc296e6fb7e4cfdb10bd888">Client::_WriteComplete</a></div><div class="ttdeci">static DWORD _WriteComplete(char *data, DWORD dwSize, CSockError ec, void *invoker)</div><div class="ttdef"><b>Definition:</b> <a href="_client_8cpp_source.html#l00051">Client.cpp:51</a></div></div>
<div class="ttc" id="a_sock_tools_8h_html_a19358efe08e40c8fe899cbec837c5d87"><div class="ttname"><a href="_sock_tools_8h.html#a19358efe08e40c8fe899cbec837c5d87">lpPostCompleteFunc</a></div><div class="ttdeci">DWORD(* lpPostCompleteFunc)(void *invoker)</div><div class="ttdef"><b>Definition:</b> <a href="_sock_tools_8h_source.html#l00191">SockTools.h:191</a></div></div>
<div class="ttc" id="atools_8h_html_ac909db71799bb22cb7d636a34cd785e4"><div class="ttname"><a href="tools_8h.html#ac909db71799bb22cb7d636a34cd785e4">DEF_END_LIBTOOLS</a></div><div class="ttdeci">#define DEF_END_LIBTOOLS</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00038">tools.h:38</a></div></div>
<div class="ttc" id="a_client_8h_html"><div class="ttname"><a href="_client_8h.html">Client.h</a></div></div>
<div class="ttc" id="aclass_client_html_a5922d4b508779e8788fdbd3a6d137b01"><div class="ttname"><a href="class_client.html#a5922d4b508779e8788fdbd3a6d137b01">Client::_service</a></div><div class="ttdeci">Service * _service</div><div class="ttdef"><b>Definition:</b> <a href="_client_8h_source.html#l00107">Client.h:107</a></div></div>
<div class="ttc" id="aclass_shared_ptr_html_a0b0a4c8396bf40f91994f729855c0a5a"><div class="ttname"><a href="class_shared_ptr.html#a0b0a4c8396bf40f91994f729855c0a5a">SharedPtr::Reset</a></div><div class="ttdeci">void Reset(Ty *p)</div><div class="ttdef"><b>Definition:</b> <a href="_shared_ptr_8h_source.html#l00175">SharedPtr.h:175</a></div></div>
<div class="ttc" id="aclass_service_html_a040c5f1db96aad100bb713db069bc19e"><div class="ttname"><a href="class_service.html#a040c5f1db96aad100bb713db069bc19e">Service::GetClientIden</a></div><div class="ttdeci">std::string GetClientIden(Client *c) const</div><div class="ttdoc">生成客户端标志</div><div class="ttdef"><b>Definition:</b> <a href="_service_8cpp_source.html#l00120">Service.cpp:120</a></div></div>
<div class="ttc" id="aclass_client_html_a3a51b4121807ea860a242a86cfb9e9ab"><div class="ttname"><a href="class_client.html#a3a51b4121807ea860a242a86cfb9e9ab">Client::TimeoutComplete</a></div><div class="ttdeci">virtual int TimeoutComplete(const char *msg)</div><div class="ttdoc">超时处理</div><div class="ttdef"><b>Definition:</b> <a href="_client_8h_source.html#l00058">Client.h:58</a></div></div>
<div class="ttc" id="atools_8h_html_a798af1e30bc65f319c1a246cecf59e39"><div class="ttname"><a href="tools_8h.html#a798af1e30bc65f319c1a246cecf59e39">DWORD</a></div><div class="ttdeci">unsigned int DWORD</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00134">tools.h:134</a></div></div>
<div class="ttc" id="aclass_c_socket_html_aa915ac02c07eed947bf2da35eacc3545"><div class="ttname"><a href="class_c_socket.html#aa915ac02c07eed947bf2da35eacc3545">CSocket::Close</a></div><div class="ttdeci">virtual int Close()</div><div class="ttdoc">关闭套接字</div><div class="ttdef"><b>Definition:</b> <a href="_socket_8cpp_source.html#l00107">Socket.cpp:107</a></div></div>
<div class="ttc" id="aclass_client_html_aaf6a8239f1f36ef898d289860d7dacb3"><div class="ttname"><a href="class_client.html#aaf6a8239f1f36ef898d289860d7dacb3">Client::Close</a></div><div class="ttdeci">virtual void Close()</div><div class="ttdoc">关闭客户端</div><div class="ttdef"><b>Definition:</b> <a href="_client_8cpp_source.html#l00104">Client.cpp:104</a></div></div>
<div class="ttc" id="aclass_client_html_a37839a1150d07286be0f8c2c06b58ba0"><div class="ttname"><a href="class_client.html#a37839a1150d07286be0f8c2c06b58ba0">Client::PostRecv</a></div><div class="ttdeci">virtual void PostRecv(char *buff, size_t size)</div><div class="ttdoc">投递读</div><div class="ttdef"><b>Definition:</b> <a href="_client_8cpp_source.html#l00078">Client.cpp:78</a></div></div>
<div class="ttc" id="aclass_client_html_a199f02fb548197610325ffad0bf0946b"><div class="ttname"><a href="class_client.html#a199f02fb548197610325ffad0bf0946b">Client::ResetTimer</a></div><div class="ttdeci">virtual bool ResetTimer()</div><div class="ttdoc">重置定时器</div><div class="ttdef"><b>Definition:</b> <a href="_client_8cpp_source.html#l00133">Client.cpp:133</a></div></div>
<div class="ttc" id="aclass_c_socket_html_abfcf493607b9c1b40db907d89731d4a9"><div class="ttname"><a href="class_c_socket.html#abfcf493607b9c1b40db907d89731d4a9">CSocket::GetSockPtr</a></div><div class="ttdeci">virtual SOCKET * GetSockPtr() const</div><div class="ttdoc">获取套接口句柄指针</div><div class="ttdef"><b>Definition:</b> <a href="_socket_8cpp_source.html#l00161">Socket.cpp:161</a></div></div>
<div class="ttc" id="anamespace_s_o_c_k_e_t_s_t_a_t_u_s_html_a960fa087f22eb32da3c7d0c805be7876a21f4b3f4919004aed6322dd5435c430c"><div class="ttname"><a href="namespace_s_o_c_k_e_t_s_t_a_t_u_s.html#a960fa087f22eb32da3c7d0c805be7876a21f4b3f4919004aed6322dd5435c430c">SOCKETSTATUS::TIMEOUT</a></div><div class="ttdoc">请求超时</div><div class="ttdef"><b>Definition:</b> <a href="_socket_def_8h_source.html#l00102">SocketDef.h:102</a></div></div>
<div class="ttc" id="aclass_client_html_afb79191c921f4055e98a1630a328a850"><div class="ttname"><a href="class_client.html#afb79191c921f4055e98a1630a328a850">Client::Client</a></div><div class="ttdeci">Client()</div><div class="ttdef"><b>Definition:</b> <a href="_client_8cpp_source.html#l00013">Client.cpp:13</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_socket_html_a8f5c6e049211a3f7c607d5bdfa978649"><div class="ttname"><a href="class_c_tcp_io_socket.html#a8f5c6e049211a3f7c607d5bdfa978649">CTcpIoSocket::AsyncSend</a></div><div class="ttdeci">void AsyncSend(const CStreamIteator &amp;buff, const Func &amp;func)</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_socket_8h_source.html#l00143">TcpIoSocket.h:143</a></div></div>
<div class="ttc" id="atools_8h_html_ab689500aaec0db066e3ac9483d3fe425"><div class="ttname"><a href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a></div><div class="ttdeci">#define NullPtr</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00119">tools.h:119</a></div></div>
<div class="ttc" id="aclass_c_timer_html_afadf9bf2c7fe7f1a6d7c34cbf90f979e"><div class="ttname"><a href="class_c_timer.html#afadf9bf2c7fe7f1a6d7c34cbf90f979e">CTimer::SetTimer</a></div><div class="ttdeci">void SetTimer(const CTimeBase &amp;t, Func func)</div><div class="ttdef"><b>Definition:</b> <a href="_timer_8h_source.html#l00110">Timer.h:110</a></div></div>
<div class="ttc" id="aclass_c_socket_html_a31c4a61d9f5a4b6cbada3894c7d70c66"><div class="ttname"><a href="class_c_socket.html#a31c4a61d9f5a4b6cbada3894c7d70c66">CSocket::GetSocketID</a></div><div class="ttdeci">virtual SOCKIDEN GetSocketID() const</div><div class="ttdoc">返回在服务类里面初始化的一个唯一ID（仅对与之关联的服务类而言）,0表示没有身份ID</div><div class="ttdef"><b>Definition:</b> <a href="_socket_8cpp_source.html#l00281">Socket.cpp:281</a></div></div>
<div class="ttc" id="aclass_c_timer_html"><div class="ttname"><a href="class_c_timer.html">CTimer</a></div><div class="ttdoc">定时器</div><div class="ttdef"><b>Definition:</b> <a href="_timer_8h_source.html#l00069">Timer.h:69</a></div></div>
<div class="ttc" id="aclass_c_machine_time_html"><div class="ttname"><a href="class_c_machine_time.html">CMachineTime</a></div><div class="ttdoc">机器时间类</div><div class="ttdef"><b>Definition:</b> <a href="_time_8h_source.html#l00149">Time.h:149</a></div></div>
<div class="ttc" id="astruct_service_1_1_delete_function_html"><div class="ttname"><a href="struct_service_1_1_delete_function.html">Service::DeleteFunction</a></div><div class="ttdef"><b>Definition:</b> <a href="_service_8h_source.html#l00076">Service.h:76</a></div></div>
<div class="ttc" id="aclass_client_html_aa9714e538888d94b2c9c2acc1a4f4a68"><div class="ttname"><a href="class_client.html#aa9714e538888d94b2c9c2acc1a4f4a68">Client::Post</a></div><div class="ttdeci">virtual bool Post(DWORD(*complete)(void *), void *invoker)</div><div class="ttdoc">异步投递一个完成</div><div class="ttdef"><b>Definition:</b> <a href="_client_8cpp_source.html#l00092">Client.cpp:92</a></div></div>
<div class="ttc" id="aclass_client_html_ae044429f6533cd0c275f58a2aeef5a1c"><div class="ttname"><a href="class_client.html#ae044429f6533cd0c275f58a2aeef5a1c">Client::_TimeoutComplete</a></div><div class="ttdeci">static DWORD _TimeoutComplete(CSockError ec, void *invoker)</div><div class="ttdef"><b>Definition:</b> <a href="_client_8cpp_source.html#l00065">Client.cpp:65</a></div></div>
<div class="ttc" id="aclass_c_basic_service_html"><div class="ttname"><a href="class_c_basic_service.html">CBasicService</a></div><div class="ttdoc">服务类 基类</div><div class="ttdef"><b>Definition:</b> <a href="_service_base_8h_source.html#l00015">ServiceBase.h:15</a></div></div>
<div class="ttc" id="aclass_c_timer_html_a4963ccc407406050df39d7b7e9346625"><div class="ttname"><a href="class_c_timer.html#a4963ccc407406050df39d7b7e9346625">CTimer::StartTime</a></div><div class="ttdeci">CMachineTime * StartTime(CMachineTime &amp;t)</div><div class="ttdoc">获取定时器被设置的时间</div><div class="ttdef"><b>Definition:</b> <a href="_timer_8h_source.html#l00125">Timer.h:125</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_socket_html_ac93112cd926967d84b44344285aaa04d"><div class="ttname"><a href="class_c_tcp_io_socket.html#ac93112cd926967d84b44344285aaa04d">CTcpIoSocket::AsyncRead</a></div><div class="ttdeci">void AsyncRead(const CStreamIteator &amp;buff, Func func)</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_socket_8h_source.html#l00130">TcpIoSocket.h:130</a></div></div>
<div class="ttc" id="aclass_client_html_aceeb18e407bb39e5368fa2ab27d66a88"><div class="ttname"><a href="class_client.html#aceeb18e407bb39e5368fa2ab27d66a88">Client::GetClientIden</a></div><div class="ttdeci">virtual std::string GetClientIden() const</div><div class="ttdoc">获取客户端唯一标识</div><div class="ttdef"><b>Definition:</b> <a href="_client_8cpp_source.html#l00046">Client.cpp:46</a></div></div>
<div class="ttc" id="aclass_client_html_a7eedb09b405e65dfdb88700d35d7b382"><div class="ttname"><a href="class_client.html#a7eedb09b405e65dfdb88700d35d7b382">Client::GetSocket</a></div><div class="ttdeci">virtual int GetSocket() const</div><div class="ttdoc">获取socket描述符</div><div class="ttdef"><b>Definition:</b> <a href="_client_8cpp_source.html#l00036">Client.cpp:36</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_socket_html"><div class="ttname"><a href="class_c_tcp_io_socket.html">CTcpIoSocket</a></div><div class="ttdoc">用于tcp进行io投递的套接字类</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_socket_8h_source.html#l00017">TcpIoSocket.h:17</a></div></div>
<div class="ttc" id="aclass_client_html"><div class="ttname"><a href="class_client.html">Client</a></div><div class="ttdef"><b>Definition:</b> <a href="_client_8h_source.html#l00012">Client.h:12</a></div></div>
<div class="ttc" id="aclass_client_html_ac9ef3d3342a564f93d6d94ee795a28c0"><div class="ttname"><a href="class_client.html#ac9ef3d3342a564f93d6d94ee795a28c0">Client::_cliSock</a></div><div class="ttdeci">SharedPtr&lt; CTcpIoSocket &gt; _cliSock</div><div class="ttdef"><b>Definition:</b> <a href="_client_8h_source.html#l00103">Client.h:103</a></div></div>
<div class="ttc" id="aclass_client_html_a840e519ca781888cbd54181572ebe3a7"><div class="ttname"><a href="class_client.html#a840e519ca781888cbd54181572ebe3a7">Client::~Client</a></div><div class="ttdeci">virtual ~Client()</div><div class="ttdef"><b>Definition:</b> <a href="_client_8cpp_source.html#l00022">Client.cpp:22</a></div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.16
</small></address>
</body>
</html>
